package cn.itcast.zt.example.publish;

import cn.itcast.zt.annotation.NotRecommend;
import cn.itcast.zt.annotation.NotThreadSafe;
import lombok.extern.slf4j.Slf4j;

/**
 * 对象发布 -- 安全发布与不安全发布
 * create by zhangtian on 2018/4/8
 */
@Slf4j
@NotThreadSafe
@NotRecommend
public class Escape {
    private int thisCanBeEscape = 0 ;

    public Escape(){
        new InnerClass();
    }

    private class InnerClass {
        public InnerClass(){
            log.info("{}", Escape.this.thisCanBeEscape);
            log.info("{}", Escape.this);
        }
    }

    public static void main(String[] args) {
        new Escape() ;
    }
}
